package com.yeyks.activity.service;

import com.yeyks.activity.dal.domain.ActivityNodeUserRecord;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yeyks.activity.param.ActivityNodeUserRecordSaveByActivityParam;
import com.yeyks.common.result.activity.ActivityCardStatResult;
import com.yeyks.common.result.activity.ActivityStatForwardUserResult;
import com.yeyks.common.result.activity.ActivityStatRedResult;

import java.util.List;


/**
 * <p>
 *  服务类
 * </p>
 *
 * @author yun
 * @since 2019-12-06
 */
public interface ActivityNodeUserRecordService extends IService<ActivityNodeUserRecord> {

    //存储节点的参与人
    Boolean saveByActivity(ActivityNodeUserRecordSaveByActivityParam param);

    /**
     * 获取节点红包领取个数
     *
     * @param activityCode
     * @return
     */
    Integer getRedGetCount(String activityCode);

    /**
     * 统计每个节点的领取个数
     *
     * @param activityCode
     * @return
     */
    List<ActivityStatRedResult> redTotal(String activityCode);

    /**
     * 活动转发人数统计
     *
     * @param activityCode
     * @return
     */
    List<ActivityStatForwardUserResult> forwardUserTotal(String activityCode);

    /**
     * 根据activity_code和node统计
     *
     * @param activityCode
     * @param node
     * @return
     */
    List<ActivityCardStatResult> stat(String activityCode, String node);
}
